//
//  LSZInformationConcernManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/9.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZInformationConcernManager.h"

@implementation LSZInformationConcernManager
-(id)initWithInformationConcern :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSDictionary * diction = dic[@"data"];
        self.is_follow = [diction[@"is_follow"] integerValue];
        self.me_to = [diction[@"me_to"] integerValue];
        self.to_me = [diction[@"to_me"] integerValue];
        self.score = NullStringjudgment(NSStr(diction[@"score"]));
        self.credit = NullStringjudgment(NSStr(diction[@"credit"]));
        if ([[diction allKeys] containsObject:@"user"]) {
            NSDictionary *nameDic = diction[@"user"];
            if ([[nameDic allKeys] containsObject:@"username"]) {
                self.username = NullStringjudgment(NSStr(diction[@"user"][@"username"]));
            }else{
                self.username = @"";
            }
        }else{
            self.username = @"";
        }
    }
    return self;
}
@end

